﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public static class SLSerializer
{
	public static string ConvertToString(SaveInfo.AttributeNameValue[] i_AttName)
	{
		string s = "";
		for(int i = 0; i < i_AttName.Length; i++)
		{
			s += i_AttName[i].m_AttributeType.ToString() + "-" + i_AttName[i].m_AttributeName + ":" + i_AttName[i].m_SaveData.m_Value.ToString() + ";";
		}
		
		return s;
	}

	private static string DictionaryToString<TKey, TValue>(Dictionary<TKey, TValue> i_Dict)
	{
		string s = "";
		foreach(KeyValuePair<TKey, TValue> entry in i_Dict)
		{
			s += entry.Value.GetType().ToString() + "-" + entry.Key.ToString() + ":" + entry.Value.ToString() + ";";
		}

		return s;
	}
	
	private static void ListToString(Dictionary<object, object> i_Dict)
	{
		//foreach(object obj in i_Dict)
		//{
			//obj.
		//}
	}
}
